package com.zzyl.nursing.job;

import com.zzyl.nursing.service.IContractService;
import com.zzyl.nursing.service.member.IMemberReservationService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;


/**
 * 更新合同状态定时任务
 * @author zbr
 * @version 1.0
 * @since 2025/2/27 19:41
 */
@Component
@Slf4j
public class ContractJob {

    @Autowired
    private IContractService iContractService;

    @Autowired
    private IMemberReservationService memberReservationService;

    public void updateContractStatus() {
        iContractService.updateContractStatus();
        log.info("合同状态更新成功");
    }

    public void updateReservationStatus() {
        memberReservationService.updateReservationStatus();
        log.info("预约状态更新成功");
    }
}
